import request from '/@/utils/request';

/**
 * 项目接口
 *
 */
export function itemApi() {
	return {
		getItemManageTree: () => {
			return request({
				url: '/item/manage/tree',
				method: 'get',
			});
		},
		getItemTree: () => {
			return request({
				url: '/item/tree',
				method: 'get',
			});
		},
		addOrUpdateItemNode: (data?: object) => {
			return request({
				url: '/item/add',
				method: 'post',
				data,
			});
		},
		delItemNode: (data?: object) => {
			return request({
				url: '/item/delete',
				method: 'post',
				data,
			});
		},
		searchGitlabRepos: (data?: object) => {
			return request({
				url: '/gitlab/searchRepos',
				method: 'post',
				data,
			});
		},
	};
}
